package com.example.yaja.yaja.service;

import com.example.yaja.yaja.dao.DeliciousFoodMapper;
import com.example.yaja.yaja.entity.DeliciousFood;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by Zero on 2017/12/5.
 */
@Service("deliciousFoodService")
public class DeliciousFoodServiceImpl implements DeliciousFoodService {

    @Autowired
    DeliciousFoodMapper deliciousFoodMapper;


    /**
     * 查找美食数据
     * @param startNumber
     * @param endNumber
     * @return
     */
    @Override
    public List<DeliciousFood> findDeliciousFoodByNumber(Integer startNumber, Integer endNumber) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("startNumber", startNumber);
        params.put("endNumber", endNumber);
        return deliciousFoodMapper.selectDeliciousFoodByNumber(params);
    }
}
